﻿<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.utils.Constant" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>后台管理</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript" src="${ctx}/js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="${ctx}/js/cookie.js"></script>
<script type="text/javascript" src="${ctx}/js/common.js"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/css/common.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/reset.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/thems.css">
<script type="text/javascript" src="${ctx}/layui/layui.all.js"></script>
<link rel="stylesheet" type="text/css" href="${ctx}/layui/css/layui.css">
<script type="text/javascript" src="${ctx}/js/layui_common.js"></script>
<style>
  .center_xy {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    margin: auto;
  }
</style>
<%
    response.setHeader("Pragma","No-cache");
    response.setHeader("Cache-Control","No-cache");
    response.setDateHeader("Expires", -1);
    response.setHeader("Cache-Control", "No-store");
%>
<script type="text/javascript">
function logout(){
	$.ajax({
		url:'${ctx}/logout',
		type:'get',
		dataType:'html',
		success:function(data){
			if(data=="success"){
				parent.window.location.href="${ctx}/login.jsp";
			}
		}
	});
}
</script>
</head>
<body>
	<div class="head clearfix">
		<div class="logo" style="margin-top:10px;margin-left:10px;font-size:20px;">
			<a href="" style="color: white; text-align: center;">系统管理</a>
		</div>
		<div  style="position:relative;float:right;margin-right:20px;width:50%;height:50px;color:white;">
          <div id="test" style="display:inline;height: 20px;position: absolute;right: 0" class="center_xy">
            <span id="uinfo" style="margin-right: 0px"></span>
            ${username},欢迎登录。
            <%
              String username = (String) request.getSession().getAttribute("username");
              if (username != null && !Constant.ADMIN.contains(username)) {
            %>
            <%}%>
            <a href="javascript:void(0);" onclick="logout();" style="color:white;">退出</a></div>
		</div>
	</div>
</body>
</html>
